<div class="navButtonsTop rounded-corners">
	<h1 class="title"><g:message code="title.alterPage.show" args="[alterPageInstance.title]"/></h1>
</div>

<div class="element">
	<div class="image">
		<img src="${resource(file:alterPageInstance?.pathFileThumbnail)}"/>
	</div>
	
	<div class="tableCreate">
		<table>
		    <tbody>
		    	<usr:isAdmin>
			        <tr>
			            <td class="name"><g:message code="default.label.id"/>:</td>
			            <td class="value">${fieldValue(bean: alterPageInstance, field: "id")}</td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.disabled"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${alterPageInstance?.disabled}" /></td>
		        	</tr>
			        <tr>
			            <td class="name"><g:message code="default.label.dateCreated"/>:</td>
			            <td class="value"><g:formatDate format="dd-MM-yyyy" date="${alterPageInstance?.dateCreated}" /></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.lastUpdated"/>:</td>
			            <td class="value"><g:formatDate format="dd-MM-yyyy" date="${alterPageInstance?.lastUpdated}" /></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.moderationRequest"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${alterPageInstance?.moderationRequest}" /></td>
			        </tr>
				</usr:isAdmin>
		        <tr>
		            <td class="name"><g:message code="default.label.title"/>:</td>
		            <td class="value">${fieldValue(bean: alterPageInstance, field: "title")}</td>
		        </tr>
		        <tr>
		            <td class="name"><g:message code="default.label.description"/>:</td>
		            <td class="value">${alterPageInstance.description}</td>
		        </tr>
		        <tr>
		            <td class="name"><g:message code="default.label.page"/>:</td>
		            <td class="value"><g:link controller="page" action="show" id="${alterPageInstance?.page?.id}">${alterPageInstance?.page?.title}</g:link></td>
		        </tr>
		        <usr:isUser>
			        <tr>
			            <td class="name"><g:message code="default.label.createdBy"/>:</td>
			            <td class="value"><g:link controller="user" action="show" id="${alterPageInstance?.createdBy?.id}">${alterPageInstance?.createdBy?.alias}</g:link></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.commentable"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${alterPageInstance?.commentable}"/></td>
			        </tr>
			        <tr>
			            <td class="name"><g:message code="default.label.rateable"/>:</td>
			            <td class="value"><g:formatBoolean boolean="${alterPageInstance?.rateable}"/></td>
			        </tr>
		        </usr:isUser>
		    </tbody>
		</table>
	</div>
 
	<div class="rating">
		<g:if test="${alterPageInstance.rateable}">
			<div id="average-rating">
				<label><g:message code="default.label.rating" />:</label> <g:render template="/rate/rate" model="[instance:alterPageInstance]"/>
			</div>
			<usr:itsNotMine target="${alterPageInstance.createdBy.id}">
				<div id="your-rating">
					<label><g:message code="default.label.rate.yours" />:</label> <g:render template="/rate/rateCustom" model="[instance:alterPageInstance]"/>
				</div>
			</usr:itsNotMine>
		</g:if>
	</div>
</div>

<div class="navButtons rounded-corners">
	<g:render template="/alterPage/buttons"/>
</div>